package com.zhanghp.demo02;

/**
 * @author zhanghp
 * @date 2022-08-26 17:04
 */
public class App2 {
    public static void main(String[] args) {
        Edit edit = new Edit(PhoneType.APPLE, PhoneType.HUAWEI);
        edit.eventManager.subscribe(PhoneType.APPLE, new People("张三"));
        edit.eventManager.subscribe(PhoneType.HUAWEI, new People("李四"));


        edit.applePhone(PhoneStatus.FRESH_SUPPLIES_COME);
        edit.applePhone(PhoneStatus.SUPPLY_SHORTAGE);

        edit.huaweiPhone(PhoneStatus.FRESH_SUPPLIES_COME);
        edit.huaweiPhone(PhoneStatus.SUPPLY_SHORTAGE);
    }
}
